package com.riche.codefactory.constant;

/**
 * @EnumName: RedisConstant
 * @Description: Redission 常量
 * @Author: Gaoruiqi
 * @Date: 2025-11-04 16:19
 * @Version: 1.0
 **/
public interface RedisConstant {

    /**
     * 用户签到记录的Redis key 前缀
     */
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signins";


    /**
     * 获取用户签到记录的Redis key
     *
     * @param year
     * @param userId
     *
     */
    static String getUserSignInRedisKey(int year, long userId) {
        return String.format("%s:%s:%s", USER_SIGN_IN_REDIS_KEY_PREFIX, year, userId);

    }
}
